package com.wang.helloworld;

import java.io.Serializable;

import com.wang.helloworld.ehcache.StandaloneEhcache;

/**
 * Hello world!
 *
 */
public class EhcacheMain 
{
	StandaloneEhcache demo1 = new StandaloneEhcache("test");
	
    public static void main( String[] args )
    {
        System.out.println( "Hello World!" );
    }
    
    public void testDemo1()
    {
    	class Message implements Serializable
    	{
			private static final long serialVersionUID = 1L;
			String message;
			public Message(String message)
			{
				this.message = message;
			}
			public String toString()
			{
				return "Message: " + message;
			}
    	};
    	
    	demo1.addValue("Message", new Message("Hello EhCache!"));
    	System.out.println(demo1.getValue("Message"));
    	
    	demo1.destroy();
    }
}
